import getState from "@/api/state";
import ColoredDots from "@/template/ColoredDots/ColoredDots";
import ColumnColored from "@/template/columnColored/columnColored";
import ZuiEchart from "@/template/zuiEchart/zuiEchart";
import React from "react";
import { useEffect } from "react";
import { useState } from "react";

const Vehmodule7 = ({ condition }) => {
    const [message, setMessage] = useState("");
    const [loading, setLoading] = useState(false)
    const [state, setState] = useState({
        data: []
    })


    useEffect(() => {
        getState({
            moduleName: "carType",
            state,
            apiUrl: "/cifgp-core-api/carInfo/queryCarInfoData",
            condition: {
                ...condition,
                cType: "carType",
            },
            setState,
            setLoading,
            setMessage
        })
    }, [condition])


    return (
        <>
            {/* <ColumnColored
                loading={loading}
                hideBtn
                style={{ width: "40%" }}
                title="车辆类型分布"
                data={
                    [
                        state
                    ]
                }

            /> */}
            <ZuiEchart
                message={message}
                loading={loading}
                style={{ width: "40%" }}
                title="车辆类型分布"
                data={[state]}
                subtitle="（单位：辆）"
                hideBtn
            />
        </>
    )
}
export default Vehmodule7;